package com.hh.releasenode.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hh.releasenode.dao.SysMenuDao;
import com.hh.releasenode.dao.SysUserDao;
import com.hh.releasenode.dto.MenuDTO;
import com.hh.releasenode.entity.SysMenuEntity;
import com.hh.releasenode.entity.SysUserEntity;
import com.hh.releasenode.exception.RNException;
import com.hh.releasenode.form.SysUserForm;
import com.hh.releasenode.service.SysMenuService;
import com.hh.releasenode.service.SysUserService;
import com.hh.releasenode.utils.EncryptionUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @ClassName SysMenuServiceImpl
 * @Description 菜单 service实现类
 * @Author KunxianLi
 * Date 2020/6/12 16:19
 * Version 1.0
 **/
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> implements SysMenuService {


    /**
     * @Author KunxianLi
     * @Description 获取菜单列表
     * @Date 2020/8/27 16:33
     * @Param [id]
     * @return List<MemuInfo>
     **/
    @Override
    public List<MenuDTO> getMenuList(Long userId) {

        //当userId为空时，获取所有菜单
        //当suerId不为空时，获取当前用户的菜单
        return this.baseMapper.getMenuList(userId);
    }

}
